package com.ltx.service;

import com.ltx.dao.MemberMapper;
import com.ltx.pojo.Member;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberServiceImpl implements MemberService{

    //调用dao层
    private MemberMapper memberMapper;
    public void setMemberMapper(MemberMapper memberMapper) {
        this.memberMapper = memberMapper;
    }


    @Override
    public int addMember(Member member) {
        return memberMapper.addMember(member);
    }

    @Override
    public List<Member> queryMember() {
        return memberMapper.queryMember();
    }

    @Override
    public Member queryByName(String mName) {
        return memberMapper.queryByName(mName);
    }

    @Override
    public int updateMember(Member member) {
        return memberMapper.updateMember(member);
    }


    @Override
    public int deleteMember(int mId) {
        return memberMapper.deleteMember(mId);
    }

    @Override
    public int manCount() {
        return memberMapper.manCount();
    }

    @Override
    public int womanCount() {
        return memberMapper.womanCount();
    }
}
